/**
 *	\brief		Include product specific JavaScript
*/
TM_ProductLang = new ProductLang("modProduct");
if(wfc_js_compact === true)
{
    //include compact javascript
}
else
{
    //include non-compact javascript
}

/**
 *	\brief		Add product specific additional parameter in the URL
 *
 *	\return		the additional url want append to the request URL
*/
function AddUrlParam()
{
	return "";
}

/**
 *	\brief		The index.php body onload event handler for product
*/
function WidgetMainPageOnload()
{

}

/**
 *	\brief		Include Additional Script file after successful login
*/
function IncludeAdditionalScript()
{
}

/**
 *	\brief		Customized function to detect session timeout
*/
function WFC_isSessionExpired(RequestObject, response_text)
{
	// You have 2 things to check 'session expired'
	// 1.RequestObject (XMLHttpRequest Object), which is xhr object
	//   - Get header: RequestObject.getResponseHeader(name)
	//   - Get response code: RequestObject.status. (200, 302, 403, 404, 500, ...)
	// 2.response_text: response content
	//   - Please note that when request is failure, response_text might be 'null'.
	return false;
}

/**
 *	\brief		Customized function to detect session timeout
*/
function WFC_handler_SessionExpired(RequestObject, response_text)
{
	// now session expired, do whatever you want.
}
function IncludeIEJavaScript(jsFile)
{
	document.write('<!--[if IE]><script type="text/javascript" src="' + jsFile + '"></scr' + 'ipt><![endif]-->');
}
function WF_loadCSS(filepath)
{
    document.write('<link rel="stylesheet" href="' + filepath + '"/>');
}

/**
 *	\brief	Add cells into a table row
*/
function addCell(tr, content, attrs, td_type) {
    var tag = td_type||'td';
    var td = tr.appendChild(document.createElement(tag));
    if(!attrs) attrs = {};
    for(n in attrs){
        if(n=='class')  { td.className=attrs[n]         }
        else            { td.setAttribute(n,attrs[n]);  }
    }
    if(typeof content=='string' || typeof content=='number') {
        td.innerHTML = content==''?'&nbsp;':content;
    }
    else {
        td.appendChild(content);
    }
    return td;
}